package com.campsys.domain.param;

import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import java.util.Date;

@Data
public class StudentAddExcel {

    @NotBlank(message = "学生姓名不为空")
    @ExcelProperty("姓名")
    private String stuName;
    @ExcelProperty("来源地址")
    private String fromPlace;
    @ExcelProperty("监护人电话")
    private String parentPhone;
    @ExcelProperty("当前年级")
    private String currentGrade;
    @ExcelProperty("首次参加")
    private String isFirst;
    @ExcelProperty("备注")
    private String comment;
    @ExcelProperty("性别")
    @NotBlank(message = "性别不能为空")
    private String gender;
    @ExcelProperty("生日")
    @NotBlank(message = "生日不能为空")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date birthday;
    @ExcelProperty("电话")
    @NotBlank(message = "电话不能为空")
    private String phone;
    @ExcelProperty("邮箱")
    @NotBlank(message = "邮箱不能为空")
    private String email;

}
